Expand description
Utilities for Typst.
Modules§
- Fat pointer handling.
Macros§
- Implement an assign trait based on an existing non-assign trait.
- Create a lazy initialized, globally unique
'static
reference to a value. - Implement the
Sub
trait based on existingNeg
andAdd
impls.
Structs§
- Stores a set of numbers which are expected to be rather small.
- A value that is lazily executed on another thread.
- This struct is created by
SliceExt::group_by_key
. - A wrapper type with lazily-computed hash.
- An interned string.
- A 64-bit float that implements
Eq
,Ord
andHash
. - Efficiently stores a set of numbers which are expected to be very small. Values
< 32/64
(depending on the architecture) are stored inline, while values larger than that will lead to an allocation. - A container around a static reference that is cheap to clone and hash.
Traits§
- Extra methods for
Arc
. - Generic access to a structure’s components.
- Adapter for reversing iterators conditionally.
- An extra constant for
NonZeroUsize
. - A numeric type.
- Extra methods for
Option
. - Extra methods for
[T]
.
Functions§
- Turn a closure into a struct implementing
Debug
. - Formats a duration with a precision suitable for human display.
- Calculate a 128-bit siphash of a value.
- Check if the
Option
-wrapped L is same to R. - This is used for rounding into integer digits, and is a no-op for positive
precision
. - Returns value with
n
digits after floating point wheren
isprecision
. Standard rounding rules apply (ifn+1
th digit >= 5, round away from zero).